<%@page import="com.kaishengit.entity.Prod"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
   <head>
  	<title>My JSP 'main.jsp' starting page</title>
   </head>
  
  <body>
   <%
   List<Prod> list=(List<Prod>)request.getAttribute("prodList");
   %>
   <table border="1px" width="70%">
   		<tr>
   			<th>商品名称</th>
	   		<th>商品价格</th>
	   		<th>操作</th>
   		</tr>
    <%
   		for(Prod p:list){
   	 %>
   	 <tr> 
   	 		<td><%=p.getProdName()%></td>
   	 		<td><%=p.getPrice()%></td>
   	 		<td>
   	 			<a href="prod.jspx?m=edit&id=<%=p.getId()%>">修改</a>
   	 			<a href="prod.jspx?m=del&id=<%=p.getId()%>">删除</a>
   	 			<a href="addcar.jspx?id=<%=p.getId()%>">放入购物车</a>
   	 		</td>
   	 </tr>
   	<%}%> 
   </table>
  </body>
</html>
